package com.heima.user.feign;

import com.heima.apis.user.IUserClient;
import com.heima.model.admin.dtos.AuthDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApUserRealnameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserClient implements IUserClient {

    @Autowired
    private ApUserRealnameService apUserRealnameService;

    /**
     * 分页查询
     * @param dto
     * @return
     */
    @Override
    @PostMapping("/api/v1/auth/list")
    public ResponseResult listWmUser(AuthDto dto) {
        return apUserRealnameService.listWmUser(dto);
    }

    /**
     * 审核失败
     * @param dto
     * @return
     */
    @Override
    @PostMapping("/api/v1/auth/authFail")
    public ResponseResult authFail(AuthDto dto) {
        return apUserRealnameService.authFail(dto);
    }

    /**
     * 审核成功
     * @param dto
     * @return
     */
    @Override
    @PostMapping("/api/v1/auth/authPass")
    public ResponseResult authPass(AuthDto dto) {
        return apUserRealnameService.authFail(dto);
    }
}
